package org.javanum.number;

/**
 * <p>Represents a SubRing of an abstract Ring.</p>
 * 
 * <p>A <i>Subring T</i> of a {@link Ring} {@code R } is a subset
 * of {@code R} which is also a {@link Ring}.</p>
 * 
 * <p>Note that this interface specifies the essential pattern of SubRings:
 * <i>elements in a subring can be treated as either elements in that 
 * subring, OR as elements in the ring itself</i>. This can be restated as
 * requiring that the multiply and add operations be overloaded to accept
 * EITHER the subring element OR the element itself.</p>
 * 
 * @author Scott Fines
 * Date: Oct 31, 2009
 *
 * @param <V> The return type as a SubRing
 * @param <T> The return type as a Ring
 * @see {@link Ring}
 */
public interface SubRing<V extends SubRing<V,T>,T extends Ring<T>> extends Ring<T>, SubGroup<V, T> {
	
	/**
	 * 
	 * @param value the value to be multiplied
	 * @return the result of {@code this*value} as an implementation of 
	 * this interface
	 * @see {@link #multiply(Ring)}
	 */
	public V multiply(V value);

}
